package com.imy.luascript.app.ui.dialog;

import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.imy.common.base.BaseDialog;
import com.imy.luascript.R;

import butterknife.BindView;
import butterknife.OnClick;

public class FileSettingDialog extends BaseDialog {
    @BindView(R.id.file_setting_delete_tv)
    TextView fileSettingDeleteTv;
    @BindView(R.id.file_setting_re_name_tv)
    TextView fileSettingReNameTv;
    @BindView(R.id.file_setting_set_project)
    TextView fileSettingSetProject;

    public FileSettingDialog(AppCompatActivity activity) {
        super(activity);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_file_setting;
    }

    @OnClick(R.id.file_setting_delete_tv)
    public void onFileSettingDeleteTvClicked() {
        dismiss();
        listener.onDelete();
    }

    @OnClick(R.id.file_setting_re_name_tv)
    public void onFileSettingReNameTvClicked() {
        dismiss();
        listener.onRename();
    }

    @OnClick(R.id.file_setting_set_project)
    public void onFileSettingSetProjectClicked() {
        dismiss();
        listener.onSetCurrentProject();
    }


    public interface FileSettingChangeListener {
        void onDelete();

        void onRename();

        void onSetCurrentProject();
    }

    public void setFileSettingChangeListener(FileSettingChangeListener listener) {
        this.listener = listener;
    }

    private FileSettingChangeListener listener;

}
